package com.gardeneaters.game_v0.rules;

import com.gardeneaters.game_v0.playingfield.Garden;
import com.google.gwt.canvas.dom.client.Context2d;

public class Play {

	Garden garden;
	Path path;
	Level level;
	
	public Play(Context2d context) {
		garden = new Garden(context);
		path = new Path(garden.getHexagons());
		level = new Level(garden.getHexagons());
	}

	public void resize() {
		garden.createGarden();
		
	}

	public void update() {
		garden.draw();
		path.update();
		level.play();
	}

	public void click(int mouseStartX, int mouseStartY, int mouseEndX, int mouseEndY) {
		garden.click(mouseStartX, mouseStartY, mouseEndX, mouseEndY);
		//path.temp();
	}

}
